#include <cstdio>

int main( )
{
    double x, y, a, b;
    int t;
    scanf("%d", &t);
    while ( t-- )
    {
        scanf("%lf%lf%lf%lf", &a, &b, &x, &y);
        if ( x * x / a / a + y * y / b / b < 1 )
            puts("In ellipse");
        else
            printf("%.0lf\n", a * a * b * b );
    }
    return 0;
}
